home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Visual Cafe Pro v1.0 / VISCAFE.BIN / VPOJAVA.DLL / SOURCE / FRAME < prev    next >
Encoding:
Text File  |  1997-06-19  |  799 b   |  46 lines

  1. /*
  2.     A basic extension of the java.awt.Frame class
  3.  */
  4.  
  5. import java.awt.*;
  6.  
  7. public class Frame1 extends Frame {
  8.  
  9.     public Frame1() {
  10.  
  11.         //{{INIT_CONTROLS
  12.         setLayout(null);
  13.         addNotify();
  14.         resize(insets().left + insets().right + 400,insets().top + insets().bottom + 300);
  15.         setTitle("A Simple Frame");
  16.         //}}
  17.  
  18.         //{{INIT_MENUS
  19.         //}}
  20.     }
  21.  
  22.     public Frame1(String title) {
  23.         this();
  24.         setTitle(title);
  25.     }
  26.  
  27.     public synchronized void show() {
  28.         move(50, 50);
  29.         super.show();
  30.     }
  31.  
  32.     public boolean handleEvent(Event event) {
  33.         if (event.id == Event.WINDOW_DESTROY) {
  34.             hide();         // hide the Frame
  35.             return true;
  36.         }
  37.         return super.handleEvent(event);
  38.     }
  39.  
  40.     //{{DECLARE_CONTROLS
  41.     //}}
  42.  
  43.     //{{DECLARE_MENUS
  44.     //}}
  45. }
  46.